﻿using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Data;
using SoftSource.MVVMC;
using SoftSource.Timecard.Web.Data;
using SoftSource.Reactive;

namespace SoftSource.Timecard.Entry.ViewModelInterfaces
{
    public interface IEntryViewModelConsume : IDataViewModelConsume
    {
        IObservableProperty<PagedCollectionView> Entries { get; }

        Func<DateTime, DateTime, IObservable<Unit>> LoadEntries { get; }
        Func<EntryLog, Action, UIElement> CreateEditEntryEditorView { get; }
        Func<EntryLog, EntryLog> Clone { get; }
        Func<EntryLog, EntryLog> AddNew { get; }
        Func<IObservable<Unit>> SaveAll { get; }
        Func<EntryLog, IObservable<Unit>> Save { get; }
        Func<EntryLog, IObservable<Unit>> Delete { get; }
    }
    public interface IEntryViewModelService : IDataViewModelService
    {
        IEnumerable<EntryLog> EntrySource { get; set; }

        Func<DateTime, DateTime, IObservable<Unit>> LoadEntries { get; set; }
        Func<EntryLog, Action, UIElement> CreateEditEntryEditorView { get; set; }
        Func<EntryLog, EntryLog> Clone { get; set; }
        Func<EntryLog, EntryLog> AddNew { get; set; }
        Func<IObservable<Unit>> SaveAll { get; set; }
        Func<EntryLog, IObservable<Unit>> Save { get; set; }
        Func<EntryLog, IObservable<Unit>> Delete { get; set; }
    }
    public interface IEntryViewModel : IDataViewModel, IEntryViewModelConsume, IEntryViewModelService
    {
    }
}
